//
//  ViewController.swift
//  SwIftOperation
//
//  Created by 李江湖 on 2018/7/20.
//  Copyright © 2018年 李江湖. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let num1 = "1"
        let num2 = "2"
        let num3 = "3"
        let num4 = "4.3"
//        加减乘除 保留小数位，和取舍类型
        let allNum = num1.add(num: num2).minus(num: num3).multiplying(num: num4).numType(num: 4, type: String.RoundingType.down)
        print(allNum)
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

